/*  1:   */ package tt.dz.web.controller.manager;
/*  2:   */ 
/*  3:   */ import com.alibaba.fastjson.JSON;
/*  4:   */ import javax.annotation.Resource;
/*  5:   */ import javax.servlet.http.HttpServletRequest;
/*  6:   */ import javax.servlet.http.HttpServletResponse;
/*  7:   */ import org.springframework.stereotype.Controller;
/*  8:   */ import org.springframework.web.bind.annotation.RequestMapping;
/*  9:   */ import org.springframework.web.bind.annotation.ResponseBody;
/* 10:   */ import tt.dz.biz.service.rpc.MainServer;
/* 11:   */ import tt.dz.common.LogUtil;
/* 12:   */ import tt.dz.web.controller.BaseController;
/* 13:   */ 
/* 14:   */ @Controller
/* 15:   */ public class RPCManageController
/* 16:   */   extends BaseController
/* 17:   */ {
/* 18:   */   @Resource(name="mainServer")
/* 19:   */   private MainServer mainServer;
/* 20:   */   
/* 21:   */   @RequestMapping(value={"/closeRPCServer"}, produces={"application/json;charset=UTF-8"})
/* 22:   */   @ResponseBody
/* 23:   */   public String closeRPCServer(HttpServletRequest request, HttpServletResponse response)
/* 24:   */   {
/* 25:24 */     boolean excuteFlag = false;
/* 26:   */     try
/* 27:   */     {
/* 28:26 */       this.mainServer.closeService();
/* 29:27 */       excuteFlag = true;
/* 30:   */     }
/* 31:   */     catch (Exception e)
/* 32:   */     {
/* 33:29 */       LogUtil.error("主服务器rpc接口服务关闭失败", e);
/* 34:   */     }
/* 35:31 */     return JSON.toJSONString(assemblyResponseData(excuteFlag, null));
/* 36:   */   }
/* 37:   */   
/* 38:   */   @RequestMapping(value={"/startRPCServer"}, produces={"application/json;charset=UTF-8"})
/* 39:   */   @ResponseBody
/* 40:   */   public String startRPCServer(HttpServletRequest request, HttpServletResponse response)
/* 41:   */   {
/* 42:36 */     boolean excuteFlag = false;
/* 43:   */     try
/* 44:   */     {
/* 45:38 */       this.mainServer.startService();
/* 46:39 */       excuteFlag = true;
/* 47:   */     }
/* 48:   */     catch (Exception e)
/* 49:   */     {
/* 50:41 */       LogUtil.error("主服务器rpc接口服务启动失败", e);
/* 51:   */     }
/* 52:43 */     return JSON.toJSONString(assemblyResponseData(excuteFlag, null));
/* 53:   */   }
/* 54:   */ }


/* Location:           F:\work\pengyu\mainServer\WEB-INF\classes\
 * Qualified Name:     tt.dz.web.controller.manager.RPCManageController
 * JD-Core Version:    0.7.0.1
 */